from django.shortcuts import render
from django.views import View
# Create your views here.
from utils.goods import get_categories
class IndexView(View):
    """首页广告"""

    def get(self, request):
        """提供首页广告界面"""
        # 查询商品频道和分类
        categories = get_categories()

        # 渲染模板的上下文
        context = {
            'categories': categories,

        }
# class test(View):
#     from apps.contents.crons import generate_static_index_html
#     generate_static_index_html()